/**
 * FssFormatter.java
 */
package fss.core.logger;

import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;

import fss.util.FssUtils;

/**
 * The specific formatter object for this application.
 * 
 * @author thinh
 *
 */
public class FssFormatter extends Formatter {
    /**
     * The separator string.
     */
    private static String SEPARATOR = " | ";
    @Override
    public String format(LogRecord record) {
        Date date = new Date(record.getMillis());
        return "[" + FssUtils.formatDate(date) + "] " + record.getLevel() + SEPARATOR + record.getSourceClassName() + SEPARATOR + record.getSourceMethodName() + SEPARATOR + record.getMessage() + "\n";
    }
}
